package com.abigdreamer.im.server.module;

import org.apache.mina.core.service.IoHandlerAdapter;
import org.apache.mina.transport.socket.SocketAcceptor;

/**
 * 网络套接字的父类,在这里定义了网络套接字得一些必须的属性
 * 比如：
 * 1>IP于Port 
 * 2:消息处理器 ---用于处理网络套接字接受到的消息
 * 3:封装的非阻塞Socket --Mina底层Socket
 * 
 */
public abstract class EIMSocket {

	private boolean isStart=false;             //判断Socket是否已经启动了
	private int socket_port;                   //Socket的监听端口
	private String socket_IP;                  //Socket的IP地址
	private IoHandlerAdapter handlerAdapter;   //消息处理器
	private SocketAcceptor acceptor;           //非阻塞的server端的Socket
	
	public boolean isStart() {
		return isStart;
	}
	public void setStart(boolean isStart) {
		this.isStart = isStart;
	}
	public int getSocket_port() {
		return socket_port;
	}
	public void setSocket_port(int socket_port) {
		this.socket_port = socket_port;
	}
	public String getSocket_IP() {
		return socket_IP;
	}
	public void setSocket_IP(String socket_IP) {
		this.socket_IP = socket_IP;
	}
	public IoHandlerAdapter getHandlerAdapter() {
		return handlerAdapter;
	}
	public void setHandlerAdapter(IoHandlerAdapter handlerAdapter) {
		this.handlerAdapter = handlerAdapter;
	}
	public SocketAcceptor getAcceptor() {
		return acceptor;
	}
	public void setAcceptor(SocketAcceptor acceptor) {
		this.acceptor = acceptor;
	}
	
}
